package com.micro.school.edu.utils;

import com.micro.school.common.core.constant.SecurityConstants;
import com.micro.school.common.core.context.SecurityContextHolder;
import com.micro.school.system.api.model.LoginUser;


public class MockLoginUtils {

    public static void mockLogin() {
        SecurityContextHolder.setUserId("1");
        SecurityContextHolder.setUserName("admin");
        SecurityContextHolder.setUserKey("c570c7ce-ad75-48e2-b213-cf7c9d51b7f0");
        SecurityContextHolder.setUserTenantId("1");
        SecurityContextHolder.setUserCompusId("1");
        SecurityContextHolder.setUserCollegeId("1");

        LoginUser loginUser = new LoginUser();
        loginUser.setUserid(1L);
        loginUser.setCollegeId("1");
        loginUser.setCompusId("1");
        loginUser.setTenantId(1);
        loginUser.setUsername("admin");
        SecurityContextHolder.set(SecurityConstants.LOGIN_USER,loginUser);
    }
}
